import React, {Component} from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
/*
多选框
 */
class CheckBox extends Component {
    render() {
        let {className, disabled, value, children, id} = this.props;
        className = classNames({[`${id}`]: !!id})

        return (
            <label className={className} >
                <input id={id} type="checkbox" value={value} disabled={disabled}/>
                {children}
            </label>
        );
    }
}
CheckBox.defaultProps = {
    disabled: false,
}
CheckBox.propTypes = {
    disabled: PropTypes.bool,
    value: PropTypes.string,
    id: PropTypes.string
}
export default  CheckBox